package com.study.pojo;

import java.util.Date;
import java.util.List;
/**
 * @Author Miss kun
 * @Date 2020/9/13 18:14
 * @Version 1.0
 * 注：comment(评论的)的pojo类
 */
public class Comments {

    /**
     * comments---id  字段(评论id)
     */
    private Integer id;

    /**
     * book---book_id  字段(电影id)
     */
    private Integer book_id;

    /**
     * comment---parent_id  字段(评论的父评论)
     */
    private Integer parent_id;
    /**
     * //user---name  字段(用户姓名)
     */
    private String name;
    /**
     * comment---content  字段(评论内容)
     */
    private String content;
    /**
     * //user---user_id  字段(用户id)
     */
    private Integer user_id;
    /**
     * comment---date 字段(评论日期)
     */
    private Date date;
    /**
     * (评论的子评论)
     */
    private List<Comments> child;

    /**
     * 默认构造方法
     */
    public Comments(){}

    public Comments(Integer book_id, Integer parent_id, String name, String content, Integer user_id, List<Comments> child) {
        this.book_id = book_id;
        this.parent_id = parent_id;
        this.name = name;
        this.content = content;
        this.user_id = user_id;
        this.child = child;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getBook_id() {
        return book_id;
    }

    public void setBook_id(Integer book_id) {
        this.book_id = book_id;
    }

    public Integer getParent_id() {
        return parent_id;
    }

    public void setParent_id(Integer parent_id) {
        this.parent_id = parent_id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getUser_id() {
        return user_id;
    }

    public void setUser_id(Integer user_id) {
        this.user_id = user_id;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public List<Comments> getChild() {
        return child;
    }

    public void setChild(List<Comments> child) {
        this.child = child;
    }

    @Override
    public String toString() {
        return "Comments{" +
                "id=" + id +
                ", book_id=" + book_id +
                ", parent_id=" + parent_id +
                ", name='" + name + '\'' +
                ", content='" + content + '\'' +
                ", user_id=" + user_id +
                ", date=" + date +
                ", child=" + child +
                '}';
    }
}
